package com.stlm2.controller;

import com.stlm2.dems.service.BannerService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by apple on 2017/6/14.
 */
@Controller
@RequestMapping("/bannerC")
public class BannerController  {
    @Resource
    private BannerService bannerService;


    /**
     *  获取首页六张轮播图 wap
     *  ffl
     *  2017-06-14 10:57:36
     * @return
     */
    @ResponseBody
    @RequestMapping(value="/sixBanner.json",produces="application/json;charset=UTF-8")
    public String  getSixBannerWap(String companyCode){

        return  bannerService.getSixBannerWap();

    }


    /**
     * 获取首页六张轮播图  app
     * ffl
     * 2017-08-21 15:19:12
     * @return
     */
    @ResponseBody
    @RequestMapping(value="/appSixBanner.json",produces="application/json;charset=UTF-8")
    public String  getSixBannerApp(String companyCode){

        return  bannerService.getSixBannerApp();

    }


    /**
     * 获取三张轮播图  积分夺宝
     * ffl
     * 2017-08-17 10:02:48
     * @return
     */
    @ResponseBody
    @RequestMapping(value="/threeBanner.json",produces="application/json;charset=UTF-8")
    public String  getThreeBanner(String companyCode){

        return  bannerService.getThree();

    }

    /**
     * 按类型获取轮播图
     * ffl
     * 2017-10-12 10:13:57
     * @param typeValue
     * @return
     */
    @ResponseBody
    @RequestMapping(value="/getBanner.json",produces="application/json;charset=UTF-8")
    public String getByType(String companyCode,String typeValue){
        return bannerService.getByType(typeValue);
    }
}
